class BillingInfo {
    String insuranceName
    String groupNumber
    String creditCardNum
    Date   lastUpdated = new Date()
 
    static optionals = ["insuranceName", "insuranceGroup"]
    static constraints = {
        insuranceName(maxLength:50)
        groupNumber(maxLength:30,unique: true)
        creditCardNum(unique: true)
      //  lastUpdated(validator: { return (it >= new Date())})
    }
    String toString() {
      if (this.insuranceName)
            "${this.insuranceName}"
        else
             "--No Insurance Info--"
    }
}
